% Normalizing SPM wrt power in
% horizntal magnetic fileds
% Reference Jones et al 1989, JGR.
% latest date 28.04.2003

function[SPM] = NormSPM(SPM,ProcDef),

A = size(SPM);

for j = 1:A(2),
   for i = 1:A(1),
            pnorm = sqrt(SPM(i,j,1,1)^2+SPM(i,j,2,2)^2);   % 1 1 = HxHx* & 2 2 = HyHy*
            SPM(i,j,:,:)=SPM(i,j,:,:)/pnorm;
     end;
end;

